package com.lengxf.pay.common.config;

import com.lengxf.pay.common.enums.PayChannel;

import java.util.concurrent.ConcurrentHashMap;

public class ServerAddr {
    private static final ConcurrentHashMap<PayChannel, String> ADDR_MAP = new ConcurrentHashMap<>();

    static {
        //alipay测试地址
        put(PayChannel.ALI, "https://openapi-sandbox.dl.alipaydev.com/gateway.do");
    }

    public static void put(PayChannel key, String addr) {
        ADDR_MAP.put(key, addr);
    }

    public static String getAddr(PayChannel key) {
        return ADDR_MAP.get(key);
    }

}
